/*******************************************************************************
 * @file sht3x.h
 * @brief Sensirion - SHT3x sensor driver.
 *
 * @version 1.0.0
 *******************************************************************************
 * @license Refer License or other description Docs
 * @author  Felix
 ******************************************************************************/
#ifndef SENSOR_SHT3X_H
#define SENSOR_SHT3X_H

#include <stdint.h>
#include <stdbool.h>
#include <string.h>

/**
 *  I2C address: [7 bits addrss | 1 bit R/W ]
 *
 *  this addrss should be left shift 1 bit and append the last bit for R/W
 *  0x88 = (0x44 << 1)
 */
#define I2C_ADDR_SHT3X          0x8A

typedef enum {
    SHT3X_MASTER_H      = 0x2C06, /* measurement High Repeatability */
    SHT3X_MASTER_M      = 0x2C0D, /* measurement Medium Repeatability */
    SHT3X_MASTER_L      = 0x2C10, /* measurement Low Repeatability */
    SHT3X_SOFT_RESET    = 0x30A2
} SHT3xCommand;

bool shtx_init(const uint8_t addr, void *sp);

#endif
